/*
 * @Author: benchenchuang benchenchuang
 * @Date: 2023-05-12 17:51:10
 * @LastEditors: benchenchuang benchenchuang
 * @LastEditTime: 2023-09-02 17:13:32
 * @FilePath: /hmp-web/src/api/system/user.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request';

/**
 * @description 查询列表
 */
export const remoteList = params => {
    return request.get('/sys/user/query', params);
};

/**
 * 添加
 */
export const addInfo = data => {
    return request.post('/sys/user/insert', data);
};

/**
 * 更新
 */
export const updateInfo = data => {
    return request.post('/sys/user/update', data);
};

/**
 * 删除
 */
export const deleteInfo = data => {
    return request.post(`/sys/user/delete`, data);
};

/**
 * 用户重置密码1-发送验证码
 */
export const remoteEmailCode = inputmail => {
    return request.post(`/sys/user/password/verifycode?inputEmail=${inputmail}`);
};

/**
 * 用户重置密码1-修改新密码
 */
export const resetUserPassword = (verifycode, newpassword) => {
    return request.post(`/sys/user/password/reset?verifycode=${verifycode}&newpassword=${newpassword}`);
};

/**
 * 获取用户简历
 */
export const remoteUserResume = id => {
    return request.get(`/sys/user/queryResume?userId=${id}`);
};

/**
 * 更改超龄接口
 */
export const updateAgeLimit = params => {
    return request.get(`/sys/dictionary/updateAge`, params);
};

/**
 * 查询超龄配置
 */
export const remoteAgeLimit = params => {
    return request.get(`/sys/dictionary/queryOldConfig`, params);
};

export default {
    remoteList
};
